ERL = erl
GIT = git
REBAR = rebar3

all: compile

compile:
	@$(REBAR) compile

get-deps:
	@$(REBAR) upgrade

deps:
	@$(REBAR) compile

.PHONY: clean
clean:
	@$(REBAR) clean

eunit:
	@$(REBAR) eunit

run:
	@$(ERL) -pa _build/default/lib/chat/ebin -pa _build/default/lib/jsx/ebin \
		-s chat start

.PHONY: test
test: eunit
	@$(ERL) -make
	@$(ERL) -noshell \
		-pa _build/test/lib/chat/ebin -pa _build/test/lib/jsx/ebin \
		-s chat_queue_test run_tests \
		-s chat_channel_test run_tests \
		-s chat_private_test run_tests \
		-s init stop

show:
	@echo $(OS)

